package cn.kgc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @ClassName LoginController
 * @Description TODO
 * @Author yaozhaobao
 * @Date 2020/11/13 18:22
 * @Version 1.0
 **/
@RestController
@RequestMapping("/login")
public class LoginController {

    @RequestMapping("/test")
    public String login(@RequestParam("id")String id, HttpSession session){
        session.setAttribute("LOGIN_KEY",id);
        return "登录成功";
    }

    @RequestMapping("/test3")
    public String login3(@RequestParam("id")String id, HttpSession session){
        session.setAttribute("LOGIN_KEY",id);
        return "登录成功";
    }

    @RequestMapping("/test4")
    public String login4(@RequestParam("id")String id, HttpSession session){
        session.setAttribute("LOGIN_KEY",id);
        return "登录成功";
    }


}
